Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * Project : Vrai-Prix8 * File : src/app/municipalite/[slug]/page.tsx9 * Module : app10 * Repository : https://git.spboucher.ai/vrai-prix11 * Created : 2026-08-1312 * Last Modified : 2026-10-2013 *14 * Author : Simon-Pierre Boucher15 * Position : Professor of Finance16 * Institution : Université du Québec en Outaouais (UQO)17 * Organization : SP Boucher18 * Website : https://spboucher.ai19 * Git : https://git.spboucher.ai20 *21 * Preferred Contact: contact@spboucher.ai22 * Development : dev@spboucher.ai23 * Support : support@spboucher.ai24 * Security/Admin : admin@spboucher.ai25 *26 * Copyright (c) 202627 * Simon-Pierre Boucher28 * All rights reserved where applicable. This file is governed by the29 * applicable project license, copyright notices and relevant law.30 * Existing third-party rights and notices remain unaffected.31 *32 * License : None specified (no license file in this repository)33 *34 * Do not embed credentials, private keys, access tokens,35 * certificates or confidential personal information.36 *37 * =============================================================================38 * END OF SP BOUCHER SOURCE HEADER39 * =============================================================================40 */4142// Portrait d'une municipalité : valeur médiane, évolution, genres de propriété, ventes43// conclues, inscriptions, municipalités voisines. Voir components/municipalite/Portrait.tsx.44import type { Metadata } from "next";45import { notFound } from "next/navigation";46import { PortraitMunicipalite, metaPortrait } from "@/components/municipalite/Portrait";47import { munBySlug } from "@/lib/municipalites";4849// le registre avance chaque jour : régénération horaire, à la demande50export const revalidate = 3600;5152export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {53 const { slug } = await params;54 const mun = munBySlug(slug);55 const m = mun ? metaPortrait(mun, null) : null;56 if (!mun || !m) return { title: "Municipalité introuvable" };57 return { title: m.title, description: m.description, alternates: { canonical: `/municipalite/${slug}` }, openGraph: { title: m.title, description: m.description, type: "website" } };58}5960export default async function PageMunicipalite({ params }: { params: Promise<{ slug: string }> }) {61 const { slug } = await params;62 const mun = munBySlug(slug);63 if (!mun) notFound();64 return <PortraitMunicipalite mun={mun} genre={null} />;65}66